package TRANVIETHOANG;

import java.util.Scanner;

public class HOMEWORK_06 {

	public static void main(String[] args) {

		//1. Nhập số
		int so;
		Scanner in = new Scanner(System.in);
		System.out.println("Nhap so: ");
		so = in.nextInt();
		//2. Chọn kiểu
		byte kieu;
		System.out.println("Nhap kieu: 0 - Chan / 1 - Le: ");
		kieu = in.nextByte();
		//3. Xu li kieu
		// Duyet tu 0 den so
		if (kieu == 0)
		{
			for (int i=0;i<=so;i++)
			{
				if (i%2==0)
				{
					System.out.println("Cac so chan la " + i);
				}
			}
		}
		
		
		else if (kieu == 1){
			for (int j = 0;j<=so;j++)
			{
				while (j%2!=0){
					System.out.println("Cac so le la : " + j);
				}
			}
			
		}
		
		else {
			System.out.println("Sai kieu. ");
		}
	
	}

}
